 /* 按钮样式 */
.btn {
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn.danger {
    background: #ff3b30;
}

.btn.danger:hover {
    background: #d70015;
}

.btn.success {
    background: #28a745;
}

.btn.success:hover {
    background: #218838;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row .form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 规则列表样式 */
.rules-list {
    margin-top: 20px;
}

.rule-item {
    background: #f6f6f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #007aff;
}

.rule-item.mock {
    border-left-color: #28a745;
    background: #f8fff9;
}

.rule-item.disabled {
    opacity: 0.6;
    background: #f0f0f0;
    border-left-color: #6c757d;
}

.rule-info {
    flex: 1;
}

.rule-pattern {
    font-weight: 600;
    color: #007aff;
}

.rule-target {
    color: #86868b;
    font-size: 0.9em;
}

.rule-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 8px;
}

.rule-type.proxy {
    background: #e3f2fd;
    color: #1976d2;
}

.rule-type.mock {
    background: #e8f5e8;
    color: #2e7d32;
}

.rule-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 8px;
}

.rule-status.enabled {
    background: #d4edda;
    color: #155724;
}

.rule-status.disabled {
    background: #f8d7da;
    color: #721c24;
}

.rule-actions {
    display: flex;
    gap: 10px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 2% auto;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.3em;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #86868b;
}

/* 警告框样式 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 导航选项卡样式 */
.nav-tabs {
    display: flex;
    margin-top: 20px;
    border-bottom: 2px solid #e5e5e7;
}

.nav-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #86868b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: #007aff;
}

.nav-tab.active {
    color: #007aff;
    border-bottom-color: #007aff;
}

/* 选项卡内容样式 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 正则表达式辅助工具样式 */
.regex-helper {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.regex-test {
    margin-bottom: 15px;
}

.regex-test-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.regex-test-input input {
    flex: 1;
}

.regex-test-result {
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    min-height: 20px;
}

.regex-test-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.regex-test-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.regex-test-result.no-match {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.regex-examples {
    margin-bottom: 15px;
}

.regex-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.regex-templates .btn {
    margin: 0;
    padding: 4px 8px;
    font-size: 12px;
    background: #6c757d;
}

.regex-templates .btn:hover {
    background: #545b62;
}

.regex-syntax {
    margin-bottom: 10px;
}

.syntax-help {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    margin-top: 5px;
}

.syntax-help code {
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #e83e8c;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    line-height: 1.4;
}

/* 规则类型标识 */
.rule-pattern-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 500;
    margin-left: 8px;
    text-transform: uppercase;
}

.rule-pattern-type.string {
    background: #e3f2fd;
    color: #1976d2;
}

.rule-pattern-type.regex {
    background: #fce4ec;
    color: #c2185b;
}